package com.choosefine.springboot.devops.activity.service;

import com.choosefine.springboot.devops.activity.dto.UpdateActivityDTO;
import com.choosefine.springboot.devops.activity.model.Activity;
import com.choosefine.springboot.devops.base.config.MapUtil;
import com.choosefine.springboot.devops.base.service.BaseService;
import org.beetl.sql.core.SQLManager;
import org.beetl.sql.core.db.KeyHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class ActivityService extends BaseService{
	@Autowired
	private SQLManager sqlManager;

	public Activity selectById(Integer id){
		Map<String,Object> param=new HashMap<String, Object>();
		param.put("id",id);
		Activity result=sqlManager.selectSingle("activity.selectById",param,Activity.class);
		return result;
	}

	public List<Activity> selectList(long pageNum,long pageSize){
		List<Activity> list=sqlManager.select("activity.selectList",Activity.class,null);
		return  list;
	}

}
